package com.smiier.skin.net;

import java.util.ArrayList;

import android.content.Context;
import cn.o.app.io.INoProguard;
import cn.o.app.net.NetTask;

import com.smiier.skin.constant.Constant;
import com.smiier.skin.net.CounterGetTask.CounterGetRequest;
import com.smiier.skin.net.CounterGetTask.CounterGetResponse;
import com.smiier.skin.util.GlobalSettings;

/**
 * 获取计数器
 * 
 * @author 杨文华
 * 
 */
public class CounterGetTask extends
		NetTask<CounterGetRequest, CounterGetResponse> {

	public static class CounterGetRequest extends ORequest {
		public ArrayList<Long> uids;
		public ArrayList<Integer> types;
		public String appname = Constant.APP_NAME;
	}

	public static class CounterGetResponse extends OResponse {
		public ArrayList<TypeCount> Res;
	}

	public static class TypeCount implements INoProguard {
		public int Key;// type
		public ArrayList<ValueCount> Value;
	}

	public static class ValueCount implements INoProguard {
		public long Key;// uid qid
		public int Value;
	}

	@Override
	public void setContext(Context context) {
		super.setContext(context);
		mUrl = GlobalSettings.SERVER_URL + GlobalSettings.SERVER_URL_JOIN
				+ "?api=Counter.Get";
		mRequestMethod = METHOD_GET;
	}

}
